package cn.bj.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.bj.beans.Yxhz_work_picture;
import cn.bj.dao.Yxhz_work_pictureMapper;

@Service
public class YxhzWorkPictureService {

	@Autowired
	Yxhz_work_pictureMapper yxhz_work_pictureMapper;

	// 查询所有
	public List<Yxhz_work_picture> getAllYxhzWorkPicture() {
		return yxhz_work_pictureMapper.selectByExample(null);
	}

	// 插入
	public int insertYxhzWp(Yxhz_work_picture yxhzWP) {
		return yxhz_work_pictureMapper.insert(yxhzWP);
	}

	// 删除
	public int deleteByYxhzWP(Integer id) {
		return yxhz_work_pictureMapper.deleteByPrimaryKey(id);
	}

	// 查询单个
	public Yxhz_work_picture selectById(Integer id) {
		return yxhz_work_pictureMapper.selectByPrimaryKey(id);
	}

	// 修改
	public int updateYxhzWp(Yxhz_work_picture yhp) {
		return yxhz_work_pictureMapper.updateByPrimaryKey(yhp);
	}

}
